Scenario #5006: Subscribe Another Person to Existing Mailinglist As Normal User

Properties

Required

Given

name value
partnerPersonTradeName First GmbH
subscriberFamilyName Miller
subscriberGivenName Frida
subscriberEMailAddress frida.miller@example.org
mailingList first-gmbh-internal

Person: First GmbH

HTTP GET "/api/hs/office/persons?name=First+GmbH" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<tst-person_firbysusan>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "50df9b54-6221-4116-ad23-49d2876d8100", // Person: First GmbH
  "personType" : "LEGAL_PERSON",
  "tradeName" : "First GmbH",
  "salutation" : null,
  "title" : null,
  "givenName" : null,
  "familyName" : null
} ]

In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one.

Subscribe Frida Miller to first-gmbh-internal

HTTP POST "/api/hs/office/relations" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<tst-person_firbysusan>"` \
  `# }` \
  <<EOF
{
  "type" : "SUBSCRIBER",
  "mark" : "first-gmbh-internal",
  "anchor.uuid" : "50df9b54-6221-4116-ad23-49d2876d8100", // Person: First GmbH
  "holder" : {
    "personType" : "NATURAL_PERSON",
    "familyName" : "Miller",
    "givenName" : "Frida"
  },
  "contact" : {
    "caption" : "Frida Miller",
    "emailAddresses" : {
      "main" : "frida.miller@example.org"
    }
  }
}
EOF
=> status: 201 CREATED 3c0bb03e-bfa5-4be2-906a-f1b924f48bb3

generated on 2026-08-10 04:34:24 for branch HEAD